The Expression Editor has a Target button for inserting target names. In some situations, once you click the Target button, the area above the Target field displays movie clips that can be targeted. If this is the case and one of these movie clips is to be targeted, double-click the movie clip's name. The correct information is automatically entered in the Target field. At other times, the Timeline that you wish to target will not be in the window and the path will need to be entered manually.
Similar to the hierarchy of files and folders on a web server, Flash has a hierarchy of Timelines. To specify targets at different levels in the hierarchy, add a path to the target's instance name using the same system as for file paths or URLs. Movies (SWF files) are at the top of the hierarchy with movie clips below them.
The syntax for identifying targets is similar to that for folders in a file system. For example, a leading "/" identifies a movie clip at the root of the current layer. Targets without the "/" are identified relative to the current movie clip.
The following Tell Target
paths use the seven Timeline example from the previous section:
![]() |
/Jack targets the movie clip named ClipA from the main Timeline of MovieX . |
![]() |
../ targets the Timeline of MovieX from the movie clip named ClipA . |
![]() |
/Jack/Bert targets movie clip ClipA1 from any other movie clip. |
![]() |
Bert targets movie clip ClipA1 from the Timeline of movie clip ClipA . |
![]() |
../Ernie targets movie clip ClipA2 from the Timeline of ClipA1 . |
![]() |
_level1/Smith targets movie clip ClipC in MovieY from any other movie clip. |
![]() |
A blank target field name targets the current Timeline. |
The same movie clip can be targeted using more detailed variations of the path name. For example, /Jack
targets the movie clip named ClipA
from the main Timeline of MovieX
; so does _level0/Jack
which merely includes more information. A more detailed path name might be useful if you copy buttons with Tell Target
statements from one movie to the next, changing the context of the button.
You can also use an expression to specify a target. For example, the expression "/"&ButtonName
in the Parameters pane has Tell Target
send a message to the movie clip contained in the variable ButtonName.
A Timeline must currently be in the Flash Player in order to be targeted. A movie clip Timeline is present in the Player when the playback head is positioned within the movie clip's frames. For example, if a movie clip is placed on the Timeline in frames 1 through 20, the movie clip can be targeted while the movie is playing or stopped at any frame between 1 and 20. After the movie reaches frame 21 the movie clip is no longer in the Player and cannot be targeted. See Checking whether a frame is loaded to set up a statement to check for a frame before executing the Tell Target
statement.
The following sample action is for a button on the main Timeline that, when pressed, stops the movie clip instance Jack from playing. When the button is released, the action starts frame 55 of the movie clip instance Bert:
On (Press) Begin Tell Target ("/Jack") Stop End Tell Target End On On (Release) Begin Tell Target ("/Jack/Bert") Go to and Play (55) End Tell Target Go to Next Frame End On